package com.witmore.neutron.ai.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 会话记录表
 * </p>
 *
 * @author 豆子高
 * @since 2025-06-05
 */
@Getter
@Setter
@TableName("neutron_agent_session_record")
public class AgentSessionRecordDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 智能助手id
     */
    @TableField("agent_id")
    private Integer agentId;

    /**
     * 智能助手编码
     */
    @TableField("agent_code")
    private String agentCode;

    /**
     * 智能助手名称
     */
    @TableField("agent_name")
    private String agentName;

    /**
     * 会话来源web；api）
     */
    @TableField("source")
    private String source;

    /**
     * 会话ID
     */
    @TableField("session_id")
    private String sessionId;

    /**
     * 首条消息
     */
    @TableField("first_completion")
    private String firstCompletion;

    /**
     * 消息条数
     */
    @TableField("record_count")
    private Integer recordCount;

    /**
     * 是否流式调用（0：非流式；1：流式）
     */
    @TableField("is_streaming")
    private Boolean isStreaming;

    /**
     * 是否删除 1已删除 0未删除
     */
    @TableField("is_deleted")
    private Boolean isDeleted;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private LocalDateTime createTime;
}
